#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;

class Solution 
{
public:
    vector<int> FindNumsAppearOnce(vector<int>& nums) 
    {
        vector<int> v;
        unordered_map<int, int> mp;
        for (auto e : nums)
        {
            mp[e]++;
        }
        for (auto e : nums)
        {
            if (mp[e] == 1)
                v.emplace_back(e);
        }
        if (v[0] < v[1])
            return v;
        else
            return { v[1],v[0] };
    }
};


int main()
{
    vector<int> v{ 1,2,3,3,2,9 };
    Solution xz;

    vector<int> v2 = xz.FindNumsAppearOnce(v);
    for (auto e : v2)
    {
        cout << e << ' ';
    }

	return 0;
}
